﻿'use strict';

if (zxcv && !zxcv.raw.Input) {
    zxcv.raw.Input = function (canvas) {
        /*
        this.mcl = []; // mouse click listeners
        this.mdcl = []; // mouse double click listeners

        var self = this;
        var click = function (e) {
            if (!e)
                e = window.event;

            var target;
            if (e.target)
                target = e.target;
            else if (e.srcElement)
                target = e.srcElement;
            else
                return;
            if (target != canvas) {
                return;
            }
                
            var l = self.clickListeners,
                x = e.clientX,
                y = e.clientY;
            for (var i = 0, length = l.length; i < length; i++) {
                l[i](x, y);
            }
        }
        var doubleClick = function (e) {
        }

        if (window.addEventListener) { // for Chrome, Firefox, ...
            window.addEventListener('click', click, false);
            window.addEventListener('dblclick', doubleClick, false);
        }
        else if (window.attachEvent) { // for IE
            window.attachEvent('click', click);
            window.attachEvent('dblclick', doubleClick);
        }
        */
    };
}